﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using messageboard.dal;
using messageboard.model;
using System.Data;

namespace messageboard.bll
{
    public class MessageBll
    {
        
        private MessageDal messagedal=null;
        public MessageBll(){
          
            messagedal =new MessageDal();
        }
       
        //获取留言板信息
        public DataTable showmessage() 
        {
            return messagedal.showmessage();
        }

        //添加留言
        public bool addmessage(string message,string title,int id) {
           return  messagedal.addmessage(message,title,id);
        }


        //按内容搜索留言
        public DataTable searchmessagebycontent(string message) {
            return messagedal.searchmessagebycontent(message);
        }


        //删除留言
        public bool deletemessage(int messageid) 
        {
            return messagedal.deletemessage(messageid);
        }
    }
}